<?php
class Portal_c extends CI_Controller {

    public function __construct() {
        parent:: __construct();
        $this->load->model('portal_m');
        $this->load->helper('form');
        $this->load->helper('html');
        $this->load->library('form_validation');
        $this->load->library('session');
        $this->load->helper('url');
        
    }
    
 

    public function index() {
        $this->historicos();
        $this->enviarMail();
    }
    
    public function irPortal(){
        $data['username']=$this->session->userdata['ses_usuario'];
        $data['rol']=$this->session->userdata['rol'];
        $data['pag'] = 1;
        $this->load->view('plantilla/portal/head', $data);
        $this->load->view('portal/inicio', $data);
        $this->load->view('plantilla/portal/footer'); 
    }
    
     public function historicos(){
        $usuario= $this->session->userdata['ses_idUsuario'];
        $data['username']=$this->session->userdata['ses_usuario'];
        $data['rol']=$this->session->userdata['rol'];
    
        $data['historial']=$this->portal_m->getHistoricos($usuario);

        $data['pag'] = 2;
        $this->load->view('plantilla/portal/head', $data);
        $this->load->view('portal/historialForm', $data);
        $this->load->view('plantilla/portal/footer'); 
    }
    
}
    ?>